package day05home;

import java.util.Arrays;

//对数组进行升序排列，并输出排序后的结果
public class ArraySort {
    public static void main(String[] args) {
        int[] arr = new int[10];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = (int) (Math.random() * 100);
            System.out.println(arr[i]);
        }
        Arrays.sort(arr);
        System.out.println("升序后为：");
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
}
